﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlMappingKhachHang.ascx.cs" Inherits="UserControl_ControlMappingKhachHang" %>
 <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
  <%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dxpc" %>

<script type="text/javascript">
    function pageLoad() {


        $("#<%= imgBtnAdd.ClientID %>").click(function () {
            $.blockUI({ css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
            });
        });
    $("#<%= btnSave.ClientID %>").click(function () {
        if ($("#<%= txtFimexKH.ClientID %>").val().length > 0)
                $.blockUI({ css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#000',
                    '-webkit-border-radius': '10px',
                    '-moz-border-radius': '10px',
                    opacity: .5,
                    color: '#fff'
                }
                });
           }
        });

       

   
$("#<%= imgBtnDelete.ClientID %>").click(function () {
    $.blockUI({ css: {
        border: 'none',
        padding: '15px',
        backgroundColor: '#000',
        '-webkit-border-radius': '10px',
        '-moz-border-radius': '10px',
        opacity: .5,
        color: '#fff'
    }
    });
});

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }
    }

</script>

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
     <dxpc:ASPxPopupControl ID="MessageBoxUserGroup" 
            PopupHorizontalAlign="WindowCenter"  PopupVerticalAlign="NotSet" PopupVerticalOffset="10" 
            Font-Bold="True" HeaderText="Chọn khách hàng"  
            runat="server"  Modal="True"  Width="800px"
            ShowPageScrollbarWhenModal="True">                
                <ContentCollection>
                    <dxpc:PopupControlContentControl Width="800px" Height="800px"  ID="PopupControlContentControl4" runat="server" SupportsDisabledAttribute="True">
                       
                                  
                                            <table border="0" width="100%">
                                            
                                                 <tr>
                                                    <td colspan="2" align="center">
                                                       
                                                        <asp:Label ID="lblSelectSPFor" runat="server" Text=""></asp:Label>
                                                    </td>
                                                </tr>
                                                 <tr>
                                                <td width="10%" align="right"><p class="direct_label">Tỉnh/Thành</p></td>
                                                <td width="90%" align="left">
                                                        <asp:DropDownList AutoPostBack="true"
                                                                        onselectedindexchanged="DropGroup_SelectedIndexChanged" ID="DropGroup" runat="server">
                                                        </asp:DropDownList>
                                                </td>
                                                </tr>
                                                 <tr>
                                                <td width="10%" align="right"><p class="direct_label">Quận/Huyện</p></td>
                                                <td width="90%" align="left">     
                                                        <asp:DropDownList ID="DropChannel" runat="server">
                                                        </asp:DropDownList>
                                                    <asp:Button ID="btGetSP" runat="server" CausesValidation="false" CssClass="direct_bt_search" Text="Lấy thông tin" 
                                                        onclick="btGetSP_Click" />
                                                </td>
                                                </tr>
                                                 <tr>
                                                    <td colspan="2">
                                                    <asp:GridView ID="grvKH" runat="server" AutoGenerateColumns="False" 
                                         OnPageIndexChanging="grvKH_PageIndexChanging" OnRowCommand="grvKH_RowCommand"
                                         PageSize="10" AllowPaging="true"
                                         DataKeyNames="CustID" EnableModelValidation="True">
                                         <Columns>
                           
                            <asp:TemplateField HeaderText="Stt">
                                <HeaderTemplate>
                                                                    STT
                                                                
                                         
                                </HeaderTemplate>
                            <ItemTemplate>
                                                                    <%# Container.DataItemIndex + 1 %>
                                                                
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="50px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
</asp:TemplateField>
                            <asp:TemplateField HeaderText="Mã khách hàng"><HeaderTemplate>
                                                                    Mã khách hàng
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                  
                  <asp:Label ID="lblitemkey" runat="server" Text='<%# Eval("custid")%>'></asp:Label>                                               
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="150px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
</asp:TemplateField>
                            <asp:TemplateField HeaderText="Tên khách hàng"><HeaderTemplate>
                                                                    Tên khách hàng
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("customer_name")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="200px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
</asp:TemplateField>
                            <asp:TemplateField HeaderText="Địa chỉ"><HeaderTemplate>
                                                                    Địa chỉ
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblGroup" runat="server" Text='<%# Eval("address")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="150px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
</asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="NPP"><HeaderTemplate>
                                                                    NPP
</HeaderTemplate>
<ItemTemplate>
                                                                  
                  <asp:Label ID="lblNPP" runat="server" Text='<%# Eval("sitename")%>'></asp:Label>                                               
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="150px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
</asp:TemplateField>
                            <asp:TemplateField>
                                            
                                                            
                                                            
                                                            
                                                            
                                           <ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ItemTemplate>
                                            <asp:ImageButton ID="imgBtnChon" runat="server" CausesValidation="False" CommandName="chon"
                                                            Height="25px" Width="25px" ImageUrl="~/Images/check.png" />
                                                </ItemTemplate><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><ControlStyle BackColor="White" BorderColor="White" /><FooterStyle BackColor="White" BorderColor="White" /><HeaderStyle BackColor="White" BorderColor="White" /><ItemStyle BackColor="White" BorderColor="White" /></asp:TemplateField>


</Columns>
</asp:GridView>
                                                    </td>
                                               </tr>
                                                
                                               
                                            </table>
                                       
                               
                           
                                     
                                                
                    </dxpc:PopupControlContentControl>                
                </ContentCollection>
            </dxpc:ASPxPopupControl> 

     <div class="direct_container_right_titletop">
                     Mapping thông tin khách hàng
                </div>
                 <hr />
                <!-- Button chuc nang-->
                <div class="direct_container_main">
                    <asp:ImageButton ID="imgBtnAdd" ToolTip="Tạo mới mghiệp vụ mapping thông tin khách hàng" onclick="imgBtnAdd_Click" CausesValidation="false" ImageUrl="~/Images/add.png" Width="32px" Height="32px" runat="server" />
                    <%--<asp:ImageButton ID="imgBtnSave" ToolTip="Mapping 02 thông tin khách hàng" onclick="imgBtnSave_Click" ImageUrl="~/Images/save.png" Width="32px" Height="32px" runat="server" />--%>
                    <asp:ImageButton ID="imgBtnDelete" CausesValidation="false"  ToolTip="Xóa nghiệp vụ" onclick="imgBtnDelete_Click" ImageUrl="~/Images/delete.png" Width="32px" Height="32px" runat="server" />
                    
                </div>
                <!-- End Button chuc nang-->
     <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
            BackColor="#CCFFFF" Font-Names="Arial" 
            Width="100%">
            <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Map thông tin" TabIndex="0">
                 <ContentTemplate>
                     <div class="direct_container_main">
                    <div class="direct_container_form_right">
                        <table border="0" width="100%">
                         <tr>
                            <td colspan="2">
                               Chọn các mã khách hàng trùng nhau từ 02 nhà phân phối
                            </td>
                        </tr>
                         <tr>
                            <td width="10%" align="right"><p class="direct_label">Mã đã Map</p></td>
                            <td width="90%" align="left">
                           
                            <asp:TextBox ID="txtMaSo" ReadOnly="True" Text="New" CssClass="input_code" 
                                    runat="server"></asp:TextBox>







                            </td>
                        </tr>
                                <tr>
                        <td align="right"><p class="direct_label">Tên khách hàng(Fimex)</p></td>
                            <td align="left">
                            <asp:TextBox ID="txtFimexKH" CssClass="input_full" runat="server"></asp:TextBox>







                           <asp:RequiredFieldValidator ControlToValidate="txtFimexKH" Display="None" ID="RFVMaHang"
                                   runat="server" ErrorMessage="Phải nhập tên sản phẩm!"></asp:RequiredFieldValidator>







                                            <cc1:ValidatorCalloutExtender TargetControlID="RFVMaHang" ID="ValidatorCalloutExtender1"
                                            runat="server" Enabled="True"></cc1:ValidatorCalloutExtender>







                            </td>
                       </tr>
                                <tr>
                        <td align="right"><p class="direct_label">Địa chỉ</p></td>
                            <td align="left">
                            <asp:TextBox ID="txtAddress" CssClass="input_full" runat="server"></asp:TextBox>







                           
                            </td>
                       </tr>   
                                <tr>
                            <td align="right"><p class="direct_label">Tỉnh/Thành</p></td>
                            <td align="left">
                                
                                <asp:DropDownList ID="ddlProvince" runat="server" 
                                             AutoPostBack="True"
                                            onselectedindexchanged="ddlProvince_SelectedIndexChanged"></asp:DropDownList>







                            </td>
                           
                        </tr>
                                <tr>
                            <td align="right"><p class="direct_label">Quận/Huyện</p></td>
                            <td align="left">
                             <asp:DropDownList ID="ddlTown" runat="server"></asp:DropDownList>







                             
                            </td>
                           
                        </tr>
                                <tr>
                                <td align="right"  valign="top"><p class="direct_label">Channel</p></td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlChannel" AutoPostBack="True" onselectedindexchanged="ddlChannel_SelectedIndexChanged"
                                     runat="server"></asp:DropDownList>







                                </td>
                            </tr>
                                <tr>
                                <td align="right"  valign="top"><p class="direct_label">Sub Channel</p></td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlSubChannel" runat="server"></asp:DropDownList>







                                     <asp:Button ID="btnSave" runat="server" Text="Lưu" onclick="btnSave_Click"/>







                                </td>
                            </tr>
                                 <tr>
                       <td colspan="2">
                           <asp:LinkButton CausesValidation="False" onclick="LinkGetDKSH_Click" 
                               ID="LinkGetDKSH" runat="server">Click vào đây để chọn khách hàng của DKSH</asp:LinkButton>







                       </td>
                       </tr>
                        <tr>
                       <td colspan="2">
                           <asp:LinkButton CausesValidation="False" onclick="LinkGetNMD_Click" 
                               ID="LinkGetNMD" runat="server">Click vào đây để chọn khách hàng của Nhật Minh Dương</asp:LinkButton>







                       </td>
                       </tr>
                        </table>
                    </div>
                     <asp:GridView ID="grvProduct" runat="server" AutoGenerateColumns="False" 
                                         onrowdeleting="grvProduct_RowDeleting" DataKeyNames="MaKH" EnableModelValidation="True">
                         <Columns>
<asp:TemplateField HeaderText="Stt">
    <HeaderTemplate>
                                                                    STT
                                                                
                                         
                                
</HeaderTemplate>
<ItemTemplate>
                                                                    <%# Container.DataItemIndex + 1 %>
                                                                
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="50px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Mã khách hàng">
    <HeaderTemplate>
                                                                    Mã khách hàng
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                  
                  <asp:Label ID="lblMaKhachHangFM" runat="server" Text='<%# Eval("MaKH")%>'></asp:Label>                                               
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="150px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Tên khách hàng">
    <HeaderTemplate>
                                                                    Tên khách hàng
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblTenHang" runat="server" Text='<%# Eval("TenKhachHang")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="200px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Địa chỉ">
    <HeaderTemplate>
                                                                    Địa chỉ
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblDiaChi" runat="server" Text='<%# Eval("DiaChi")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="200px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Tỉnh/Thành">
    <HeaderTemplate>
                                                                    Tỉnh/Thành
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                  
                  <asp:Label ID="lblTinhThanh" runat="server" Text='<%# Eval("ProvinceCode")%>'></asp:Label>                                               
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="150px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Nhà phân phối">
    <HeaderTemplate>
                                                                    Nhà phân phối
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                  
                  <asp:Label ID="lblNPP" runat="server" Text='<%# Eval("NPP")%>'></asp:Label>                                               
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="150px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
</asp:TemplateField>
<asp:CommandField  ButtonType="Image" DeleteText="Xóa" 
                                                                DeleteImageUrl="~/images/delete.png" CausesValidation="False" HeaderText="Xóa" 
                                                                 ShowDeleteButton="True" >
<ControlStyle Height="25px" Width="25px" />

<ItemStyle Height="25px" Width="25px" />
</asp:CommandField>
</Columns>
</asp:GridView>







                    </div>
                 
</ContentTemplate>
            






</cc1:TabPanel>
             <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Tìm kiếm" TabIndex="1">
                <ContentTemplate>
                     <div class="direct_container_main">
                        <div class="direct_container_form_right">
                            <table border="0" width="100%">
                                       
                                <tr>
                                    <td>
                                   

                                      <asp:GridView ID="grvBranch" runat="server" AutoGenerateColumns="False" 
                                                        DataKeyNames="CustID" EnableModelValidation="True" 
                                                        onrowcommand="grvBranch_RowCommand" AllowPaging="true"  PageSize="10"
                                                        onpageindexchanging="grvBranch_PageIndexChanging">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Stt">
                                                                <HeaderTemplate>
                                                                    STT
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <%# Container.DataItemIndex + 1 %>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="50px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Mã khách hàng(Fimex)">
                                                                <HeaderTemplate>
                                                                    Mã khách hàng(Fimex)
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                  
                                                                    <asp:Label ID="lblMaSo" runat="server" Text='<%# Eval("CustID")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="150px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Tên khách hàng">
                                                                <HeaderTemplate>
                                                                    Tên khách hàng
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                   
                                                                    <asp:Label ID="lblTenKH" runat="server" Text='<%# Eval("customer_name")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="200px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
                                                            </asp:TemplateField>
                                                             
                                                            
                                                             <asp:TemplateField>
                                                                 <ItemTemplate>
                                                                    <asp:ImageButton ID="imgBtnChon" runat="server" CausesValidation="False" 
                                                                    CommandName="chon" Height="25px" Width="25px" ImageUrl="~/Images/check.png" />
                                                                </ItemTemplate>
                                                                <ControlStyle BackColor="White" BorderColor="White" />
                                                                <FooterStyle BackColor="White" BorderColor="White" />
                                                                <HeaderStyle BackColor="White" BorderColor="White" />
                                                                <ItemStyle BackColor="White" BorderColor="White" />
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>

                                    </td>
                                </tr>
                               
                            </table>
                        </div>
                    </div>
                
</ContentTemplate>
            






</cc1:TabPanel>
             <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="Hướng dẫn" TabIndex="2">
             <ContentTemplate>
             <div class="direct_container_main">
             <div class="direct_container_form_right">
               <table border="0" width="100%">
                 <tr>
                          <td width="12%" align="right"><p class="direct_label">Mô tả:</p></td>
                                    <td width="88%" align="left">
                                        Vì lý do 02 nhà phân phối DKSH và NMD sử dụng 02 hệ thống quản lý kinh doanh khác nhau.
                                        Nên từ đó mỗi nhà phân phối đều có bộ mã khách hàng khác nhau trọng việc quản lý khách hàng,và điều này có thể xảy ra trường hợp
                                        một khách hàng nhưng có 02 mã.Vì vậy chức năng này giúp chúng ta map 02 mã khách hàng
                                        lại với nhau.
                                    </td>
                 </tr>
                 <tr>
                          <td colspan="2">1.Chọn khách hàng của DKSH bằng cách click vào link tương ứng.</td>
                         
                                   
                 </tr>
                 <tr>
                          <td colspan="2">2.Chọn khách hàng của Nhật Minh Dương bằng cách click vào link tương ứng.</td>
                                   
                 </tr>
                  <tr>
                          <td colspan="2">3.Cập nhật đầy đủ thông tin khách hàng như tên khách hàng,Địa chỉ,Tỉnh/thành,Quận/huyện, 
                           Channel,Sub Channel,sau đó click nút lưu</td>
                                   
                 </tr>
                  <tr>
                          <td colspan="2">Lưu ý:khi bạn nhấn nút lưu thì hệ thống sẽ tự tạo 01 mã khách hàng mới,cho biết 02 mã khách hàng từ
                          02 nhà phân phối đã được map về mã mới này</td>
                                   
                 </tr>
                  <tr>
                          <td colspan="2"><b>Tìm những mã đã map:chọn tag Tìm kiếm,và tìm các mã khách hàng đã được map để có thể chỉnh sửa hoặc xóa.</b></td>
                                   
                 </tr>
                
                
                
               </table>
                                                            </div>
            </div>
                                                            
</ContentTemplate>
                                                            






</cc1:TabPanel>
    </cc1:TabContainer>
     <dxpc:ASPxPopupControl ID="MessageBox" PopupHorizontalAlign="WindowCenter"  PopupVerticalAlign="WindowCenter" Font-Bold="true" HeaderText="DRM-S" runat="server" Height="91px" 
        Width="601px">
        <ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True"></dxpc:PopupControlContentControl>
</ContentCollection>
    </dxpc:ASPxPopupControl>
    </ContentTemplate>
</asp:UpdatePanel>